package com.funmi.lizip.entity;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;

import com.funmi.lizip.utils.ArrayJsonHandler;
import com.funmi.lizip.utils.ObjectJsonHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author yeyg
 * @since 2022-11-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "ec_rangers_collect", autoResultMap = true)
public class RangersCollect implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 采集标题
     */
    private String title;

    /**
     * 违规人名json
     */
    // @TableField(value = "personnel_json", typeHandler = ObjectJsonHandler.class)
    private String personnelJson;

    /**
     * 护林员id
     */
    @TableField("rangerId")
    private String rangerid;

    /**
     * 采集数据类型
     */
    private String type;

    /**
     * 地址
     */
    private String address;

    /**
     * 采集数据内容
     */
    private String collectContent;

    /**
     * 时间
     */
    private LocalDateTime createAt;

    /**
     * 是否删除
     */
    @TableField(value = "is_delete",select = false)
    @TableLogic
    private Boolean delete;

    /**
     * 视频图片json
     */
    @TableField(value = "file_json", typeHandler = ArrayJsonHandler.class)
    private JSONArray fileJson;

    /**
     * 事件类型 1.采集事件 2.其他事件
     */
    private Integer eventType;

    /**
     * 海拔
     */
    private String alt;

}
